"""Drop owner_id column of project table

Revision ID: af2ecf7ca19a
Revises: a79cdd14460e
Create Date: 2025-04-11 12:37:30.824896+00:00

"""
from typing import Sequence, Union

from alembic import op
import sqlalchemy as sa


# revision identifiers, used by Alembic.
revision: str = 'af2ecf7ca19a'
down_revision: Union[str, None] = 'a79cdd14460e'
branch_labels: Union[str, Sequence[str], None] = None
depends_on: Union[str, Sequence[str], None] = None


def upgrade() -> None:
    # ### commands auto generated by Alembic - please adjust! ###
    op.drop_constraint('projects_owner_id_fkey', 'projects', type_='foreignkey')
    op.drop_column('projects', 'owner_id')
    # ### end Alembic commands ###


def downgrade() -> None:
    # ### commands auto generated by Alembic - please adjust! ###
    op.add_column('projects', sa.Column('owner_id', sa.UUID(), autoincrement=False, nullable=False))
    op.create_foreign_key('projects_owner_id_fkey', 'projects', 'entities', ['owner_id'], ['id'])
    # ### end Alembic commands ###
